/******************************************************************************
 *                                                                            *
 *               (c) 2008-2009 HutLab. All rights reserved.                   *
 *                        Eduardo Henrique Leite                              *
 *                                                                            *
 ******************************************************************************

 History:
 Created 01/01/2009

 */

package hutlab.sudoku;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import hutlab.sudoku.engine.*;

/**
 * Game MIDlet class.
 */
public class SudokuGameRun extends MIDlet {

    // ----- FIELDS -----

    private SudokuGame mGame;

    // ----- PUBLIC -----

    /**
     * MIDlet startApp method override.
     */
    public void startApp() {
        this.mGame = new SudokuGame(this);
        Display.getDisplay(this).setCurrent((Displayable) this.mGame.getCanvas());
    }

    /**
     * MIDlet pauseApp method override.
     */
    public void pauseApp() {
    }

    /**
     * MIDlet destroyApp method override.
     */
    public void destroyApp(boolean unconditional) {
    }

    /**
     * Quits the MIDlet.
     */
    public void exit(){
        destroyApp(false);
        notifyDestroyed();
    }
}
